package com.luych.toolbox.docker.service.sdk.image.model;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class DockerImageHistoryResult extends ArrayList<DockerImageHistoryResult.History> {

    public static class History {

        @JsonProperty("Comment")
        private String comment;

        @JsonProperty("CreatedBy")
        private String createdBy;

        @JsonProperty("Size")
        private Long size;

        @JsonProperty("Id")
        private String id;

        @JsonProperty("Tags")
        private List<String> tags;

        @JsonProperty("Created")
        private Long created;

        public String getComment() {
            return comment;
        }

        public void setComment(String comment) {
            this.comment = comment;
        }

        public String getCreatedBy() {
            return createdBy;
        }

        public void setCreatedBy(String createdBy) {
            this.createdBy = createdBy;
        }

        public Long getSize() {
            return size;
        }

        public void setSize(Long size) {
            this.size = size;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public List<String> getTags() {
            return tags;
        }

        public void setTags(List<String> tags) {
            this.tags = tags;
        }

        public Long getCreated() {
            return created;
        }

        public Date getCreatedDate() {
            return created == null ? null : new Date(created * 1000);
        }

        public void setCreated(Long created) {
            this.created = created;
        }

    }
}